home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / Devices / Apple Desktop Bus / TabletDriver / DriverCaveats next >
Encoding:
Text File  |  1990-09-14  |  2.2 KB  |  56 lines  |  [TEXT/MPS ]

  1. This is a preliminary, non-functional example of an absolute pointing device driver
  2. for ADB. This example is provided primarily for developers of ADB devices, in that it demonstrates
  3. how to install an ADB device driver (aka Service routine, device handler) using the 'ADBS' resource
  4. mechanism.
  5.  
  6. It does not currently conform to the proposed ADB tablet memory structure specification
  7. (Macintosh Technocal Note #266, 2/90) in at least the following ways:
  8.  
  9. • The data structure is completely different. The driver only supports a place for device
  10. register 0 and 1, as well as some fields used internally by the driver.
  11.  
  12. • The actual data sent by the device has not been addressed by the proposed spec, and the driver
  13. just assumes nine bytes of data in the following format from device register R0:
  14.  
  15. Byte 1 = count (should be 8)
  16. Bytes 2 & 3 = state of switch(es)
  17. Bytes 4 & 5 = X coordinate
  18. Bytes 6 & 7 = Y coordinate
  19. Bytes 8 & 9 = Z coordinate
  20.  
  21. The driver does not do anything with the Z coordinate.
  22.  
  23. • There is no semaphore capability whereby the application and the driver know when each other
  24. is accessing/updating the coordinate or switch data.
  25.  
  26.  
  27.  
  28. What this example DOES provide for the reader:
  29.  
  30. • Demonstrates how to provide a driver in the 'ADBS' format, which is vaguely referenced in Inside
  31. Macintosh Volume 5. This more clearly describes, by example, the "initialization" and "driver code"
  32. sections of an 'ADBS' resource.
  33.  
  34. • The installation section provides one example of how to try to reduce possible system heap
  35. fragmentation when installing the driver code.
  36.  
  37. • The driver code provides an example of postioning the cursor, and posting mouse up/down events.
  38.  
  39. • This example also shows how a jADBProc should handle de-allocating memory that the driver
  40. uses, as well as how to install the Proc.
  41.  
  42. Other useful references:
  43.  
  44. Macintosh
  45.     Inside Macintosh Vol. 5 - Chapter 20, The Apple Desktop Bus
  46.     Macintosh Hardware Reference - Chapter 4 - The ADB Interface
  47.     Macintosh Technical notes #160 & 206
  48.  
  49. Apple II & General
  50.     Apple IIGS Hardware Reference Manual - Chapter 6
  51.     Apple IIGS Firmware Reference Manual - Chapter 9
  52.  
  53. General
  54.     MacUser: 7/87, page 142 - Boarding the Bus, by Peter Baum
  55.     Call A.P.P.L.E.: 6/87, page 24 - An Overview of Apple Desktop Bus, P. Baum
  56.